<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>New Admission Form</title>
</head>
<body>
<table width="100%">
	<tr>
		<td colspan="3">
		<h4>New Admission Form</h4>
		</td>
	</tr>
</table>

<form:form action="newAdmissionForm" commandName="admissionForm"
	method="POST">

	<s:bind
		path="*">
		<c:if test="${status.error}">
			<div id="message" class="error">Form has errors</div>
		</c:if>
	</s:bind>
	<fieldset><legend>New Admission Form</legend> 
	<table class="form-table" border="0">
		<tr>
			<td colspan="3">
			<h3><u>Student Details</u></h3>
			</td>
		</tr>
		<tr>
			<td width="80"><form:label path="firstName">First Name</form:label></td>
			<td><form:input path="firstName" id="firstName" /></td>
			<td colspan="2" class="error" width="250">&nbsp;<form:errors
				path="firstName" cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td width="80"><form:label path="middleName">Middle Name</form:label></td>
			<td><form:input path="middleName" id="middleName" /></td>
			<td colspan="2" class="error" width="250">&nbsp;<form:errors
				path="middleName" cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td width="80"><form:label path="lastName">Last Name</form:label>
			</td>
			<td><form:input id="lastName" path="lastName" /></td>
			<td colspan="2" class="error" width="250">&nbsp;<form:errors
				path="lastName" cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td><form:label path="age">Age</form:label></td>
			<td><form:input id="age" path="age" /></td>
			<td class="error" width="250"><form:errors path="age"
				cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td><form:label path="sex">Sex</form:label></td>
			<td><form:select path="sex" id="sex">
				<form:option value="" label="-- Select --" />
				<form:options items="${sexList}" />
			</form:select></td>
			<td class="error" width="250"><form:errors path="sex"
				cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td>Height (Centimeters)</td>
			<td><form:input id="height" path="height" /></td>
			<td width="250"><span class="error"><form:errors
				path="height" cssStyle="color:red;" /></span></td>
		</tr>
		<tr>
			<td>Weight</td>
			<td><form:input id="weight" path="weight" /></td>
			<td class="error" width="250">&nbsp;<form:errors path="weight"
				cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td>Blood Group</td>
			<td><form:input id="bloodGroup" path="bloodGroup" /></td>
			<td class="error" width="250">&nbsp;<form:errors
				path="bloodGroup" cssStyle="color:red;" /></td>
		</tr>
		<tr>

			<td width="150">Father's First Name</td>
			<td><form:input id="fatherFirstName" path="fatherFirstName" /></td>
			<td class="error" width="250"><form:errors
				path="fatherFirstName" cssStyle="color:red;" /></td>

		</tr>
		<tr>
			<td width="150">Father's Last Name</td>
			<td><form:input id="fatherLastName" path="fatherLastName" /></td>
			<td class="error" width="250"><form:errors path="fatherLastName"
				cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td width="150">Mother's First Name</td>
			<td><form:input id="motherFirstName" path="motherFirstName" /></td>
			<td class="error" width="250"><form:errors
				path="motherFirstName" cssStyle="color:red;" /></td>

		</tr>
		<tr>
			<td width="150">Mother's Last Name</td>
			<td><form:input id="motherLastName" path="motherLastName" /></td>
			<td class="error" width="250"><form:errors path="motherLastName"
				cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td width="150">Guardian's First Name</td>
			<td><form:input id="guardianFirstName" path="guardianFirstName" /></td>
			<td class="error" width="250"><form:errors
				path="guardianFirstName" cssStyle="color:red;" /></td>

		</tr>
		<tr>
			<td width="150">Guardian's Last Name</td>
			<td><form:input id="guardianLastName" path="guardianLastName" /></td>
			<td class="error" width="250"><form:errors
				path="guardianLastName" cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td colspan="3">
			<table border="0" width="100%">
				<tr>
					<td colspan="3">
					<h3><u>Contact Details</u></h3>
					</td>
				</tr>
				<tr>
					<td width="150">Address Line One</td>
					<td width="200"><form:input id="addressLineOne"
						path="addressLineOne" cssStyle="width: 200px;" /></td>
					<td class="error">&nbsp;<form:errors path="addressLineOne"
						cssStyle="color:red;" /></td>
				</tr>
				<tr>
					<td width="150">Address Line Two</td>
					<td width="200"><form:input id="addressLineTwo"
						path="addressLineTwo" cssStyle="width: 200px;" /></td>
					<td class="error">&nbsp;<form:errors path="addressLineTwo" /></td>
				</tr>
				<tr>
					<td width="150">Address Line Three</td>
					<td width="200"><form:input id="addressLineThree"
						path="addressLineThree" cssStyle="width: 200px;" /></td>
					<td class="error">&nbsp;<form:errors path="addressLineThree" /></td>
				</tr>
				<tr>
					<td width="150">Zip Code</td>
					<td width="150"><form:input id="zipCode" path="zipCode"
						maxlength="6" /></td>
					<td class="error">&nbsp;<form:errors path="zipCode"
						cssStyle="color:red;" /></td>
				</tr>
				<tr>
					<td>City</td>
					<td><form:select path="city" id="city">
						<form:option value="0" label="-- Select --" />
						<form:options items="${cityList}" itemLabel="cityName"
							itemValue="cityId" />
					</form:select></td>
					<td class="error" width="250"><form:errors path="sex"
						cssStyle="color:red;" /></td>
				</tr>

				<tr>
					<td>Country</td>
					<td><form:select path="country" id="country">
						<form:option value="0" label="-- Select --" />
						<form:options items="${countryList}" />
					</form:select></td>
					<td class="error" width="250"><form:errors path="country"
						cssStyle="color:red;" /></td>
				</tr>
				<tr>
					<td>Primary Contact Number</td>
					<td><form:input id="primaryContactNumber"
						path="primaryContactNumber" /></td>
					<td class="error" width="250">&nbsp;<form:errors
						path="primaryContactNumber" cssStyle="color:red;" /></td>
				</tr>
				<tr>
					<td>Alternate Contact Number</td>
					<td><form:input id="alternateContactNumber"
						path="alternateContactNumber" /></td>
					<td class="error" width="250">&nbsp;<form:errors
						path="alternateContactNumber" cssStyle="color:red;" /></td>
				</tr>
			</table>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><input type="submit" value="save" class="button" /></td>
			<td>&nbsp;</td>
		</tr>
	</table>
	</fieldset>
</form:form>
</body>
</html>